<html>
<head>
<title>作业_雷达加好友.ets</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
.s0 { color: #bbb529;}
.s1 { color: #a9b7c6;}
.s2 { color: #faa23d;}
.s3 { color: #3d8c2b; font-weight: bold;}
.s4 { color: #e2da90;}
.s5 { color: #b3e54c;}
.s6 { color: #db7e9b;}
.s7 { color: #aa7dfc;}
</style>
</head>
<body bgcolor="#2b2b2b">
<table CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" BGCOLOR="#606060" >
<tr><td><center>
<font face="Arial, Helvetica" color="#000000">
作业_雷达加好友.ets</font>
</center></td></tr></table>
<pre><span class="s0">@</span><span class="s1">Entry</span>
<span class="s0">@</span><span class="s1">Component</span>
<span class="s1">struct Index </span><span class="s2">{</span>
  <span class="s3">//定义旋转</span>
  <span class="s0">@</span><span class="s1">State renderrotate</span><span class="s4">: </span><span class="s1">number </span><span class="s4">= </span><span class="s5">0</span>
  <span class="s3">//3.依次出现周围联系人头像</span>
  <span class="s1">getShow </span><span class="s4">= </span><span class="s1">TransitionEffect</span><span class="s4">.</span><span class="s1">OPACITY</span><span class="s4">.</span><span class="s1">animation</span><span class="s6">(</span><span class="s2">{ </span><span class="s1">delay</span><span class="s4">: </span><span class="s5">1000 </span><span class="s2">}</span><span class="s6">)</span>
    <span class="s4">.</span><span class="s1">combine</span><span class="s6">(</span><span class="s1">TransitionEffect</span><span class="s4">.</span><span class="s1">scale</span><span class="s6">(</span><span class="s2">{ </span><span class="s1">x</span><span class="s4">: </span><span class="s5">0</span><span class="s4">, </span><span class="s1">y</span><span class="s4">: </span><span class="s5">0 </span><span class="s2">}</span><span class="s6">)) </span><span class="s3">//3.依次出现周围联系人头像</span>
  <span class="s1">getShow1 </span><span class="s4">= </span><span class="s1">TransitionEffect</span><span class="s4">.</span><span class="s1">OPACITY</span><span class="s4">.</span><span class="s1">animation</span><span class="s6">(</span><span class="s2">{ </span><span class="s1">delay</span><span class="s4">: </span><span class="s5">3000 </span><span class="s2">}</span><span class="s6">)</span>
    <span class="s4">.</span><span class="s1">combine</span><span class="s6">(</span><span class="s1">TransitionEffect</span><span class="s4">.</span><span class="s1">scale</span><span class="s6">(</span><span class="s2">{ </span><span class="s1">x</span><span class="s4">: </span><span class="s5">0</span><span class="s4">, </span><span class="s1">y</span><span class="s4">: </span><span class="s5">0 </span><span class="s2">}</span><span class="s6">)) </span><span class="s3">//3.依次出现周围联系人头像</span>
  <span class="s1">getShow2 </span><span class="s4">= </span><span class="s1">TransitionEffect</span><span class="s4">.</span><span class="s1">OPACITY</span><span class="s4">.</span><span class="s1">animation</span><span class="s6">(</span><span class="s2">{ </span><span class="s1">delay</span><span class="s4">: </span><span class="s5">5000 </span><span class="s2">}</span><span class="s6">)</span>
    <span class="s4">.</span><span class="s1">combine</span><span class="s6">(</span><span class="s1">TransitionEffect</span><span class="s4">.</span><span class="s1">scale</span><span class="s6">(</span><span class="s2">{ </span><span class="s1">x</span><span class="s4">: </span><span class="s5">0</span><span class="s4">, </span><span class="s1">y</span><span class="s4">: </span><span class="s5">0 </span><span class="s2">}</span><span class="s6">)) </span><span class="s3">//3.依次出现周围联系人头像</span>
  <span class="s1">getShow3 </span><span class="s4">= </span><span class="s1">TransitionEffect</span><span class="s4">.</span><span class="s1">OPACITY</span><span class="s4">.</span><span class="s1">animation</span><span class="s6">(</span><span class="s2">{ </span><span class="s1">delay</span><span class="s4">: </span><span class="s5">7000 </span><span class="s2">}</span><span class="s6">)</span>
    <span class="s4">.</span><span class="s1">combine</span><span class="s6">(</span><span class="s1">TransitionEffect</span><span class="s4">.</span><span class="s1">scale</span><span class="s6">(</span><span class="s2">{ </span><span class="s1">x</span><span class="s4">: </span><span class="s5">0</span><span class="s4">, </span><span class="s1">y</span><span class="s4">: </span><span class="s5">0 </span><span class="s2">}</span><span class="s6">))</span>

  <span class="s1">build</span><span class="s6">() </span><span class="s2">{</span>
    <span class="s1">Stack</span><span class="s6">() </span><span class="s2">{</span>
      <span class="s1">Column</span><span class="s6">() </span><span class="s2">{</span>
        <span class="s1">Stack</span><span class="s6">(</span><span class="s2">{ </span><span class="s1">alignContent</span><span class="s4">: </span><span class="s1">Alignment</span><span class="s4">.</span><span class="s1">Center </span><span class="s2">}</span><span class="s6">) </span><span class="s2">{</span>
          <span class="s1">Image</span><span class="s6">(</span><span class="s1">$r</span><span class="s6">(</span><span class="s7">'app.media.ic_around_radar'</span><span class="s6">))</span>
            <span class="s4">.</span><span class="s1">width</span><span class="s6">(</span><span class="s7">'130%'</span><span class="s6">)</span>
            <span class="s4">.</span><span class="s1">rotate</span><span class="s6">(</span><span class="s2">{ </span><span class="s1">angle</span><span class="s4">: </span><span class="s1">this</span><span class="s4">.</span><span class="s1">renderrotate </span><span class="s2">}</span><span class="s6">)</span>
            <span class="s4">.</span><span class="s1">animation</span><span class="s6">(</span><span class="s2">{ </span><span class="s1">iterations</span><span class="s4">: -</span><span class="s5">1</span><span class="s4">, </span><span class="s1">curve</span><span class="s4">: </span><span class="s1">Curve</span><span class="s4">.</span><span class="s1">Linear </span><span class="s2">}</span><span class="s6">)</span>
            <span class="s4">.</span><span class="s1">onAppear</span><span class="s6">(() </span><span class="s4">=&gt; </span><span class="s2">{</span>
              <span class="s1">this</span><span class="s4">.</span><span class="s1">renderrotate </span><span class="s4">= </span><span class="s5">360</span>
            <span class="s2">}</span><span class="s6">)</span>
          <span class="s1">Image</span><span class="s6">(</span><span class="s1">$r</span><span class="s6">(</span><span class="s7">'app.media.ic_avatar'</span><span class="s6">))</span>
            <span class="s4">.</span><span class="s1">width</span><span class="s6">(</span><span class="s5">80</span><span class="s6">)</span>
            <span class="s4">.</span><span class="s1">borderRadius</span><span class="s6">(</span><span class="s5">40</span><span class="s6">)</span>
        <span class="s2">}</span>
        <span class="s4">.</span><span class="s1">width</span><span class="s6">(</span><span class="s7">'100%'</span><span class="s6">)</span>
        <span class="s4">.</span><span class="s1">height</span><span class="s6">(</span><span class="s7">'100%'</span><span class="s6">)</span>
      <span class="s2">}</span>
      <span class="s4">.</span><span class="s1">backgroundImage</span><span class="s6">(</span><span class="s1">$r</span><span class="s6">(</span><span class="s7">'app.media.ic_around_friends_bg'</span><span class="s6">))</span>
      <span class="s4">.</span><span class="s1">width</span><span class="s6">(</span><span class="s7">'100%'</span><span class="s6">)</span>
      <span class="s4">.</span><span class="s1">height</span><span class="s6">(</span><span class="s7">'100%'</span><span class="s6">)</span>
      <span class="s4">.</span><span class="s1">backgroundImageSize</span><span class="s6">(</span><span class="s1">ImageSize</span><span class="s4">.</span><span class="s1">Cover</span><span class="s6">)</span>


      <span class="s1">Image</span><span class="s6">(</span><span class="s1">$r</span><span class="s6">(</span><span class="s7">'app.media.ic_avatar_stronger1'</span><span class="s6">))</span>
        <span class="s4">.</span><span class="s1">width</span><span class="s6">(</span><span class="s5">80</span><span class="s6">)</span>
        <span class="s4">.</span><span class="s1">borderRadius</span><span class="s6">(</span><span class="s5">40</span><span class="s6">)</span>
        <span class="s4">.</span><span class="s1">position</span><span class="s6">(</span><span class="s2">{ </span><span class="s1">top</span><span class="s4">: </span><span class="s5">100</span><span class="s4">, </span><span class="s1">left</span><span class="s4">: </span><span class="s5">50 </span><span class="s2">}</span><span class="s6">)</span>
        <span class="s4">.</span><span class="s1">transition</span><span class="s6">(</span><span class="s1">this</span><span class="s4">.</span><span class="s1">getShow</span><span class="s6">)</span>

      <span class="s1">Image</span><span class="s6">(</span><span class="s1">$r</span><span class="s6">(</span><span class="s7">'app.media.ic_avatar_stronger2'</span><span class="s6">))</span>
        <span class="s4">.</span><span class="s1">width</span><span class="s6">(</span><span class="s5">80</span><span class="s6">)</span>
        <span class="s4">.</span><span class="s1">borderRadius</span><span class="s6">(</span><span class="s5">40</span><span class="s6">)</span>
        <span class="s4">.</span><span class="s1">position</span><span class="s6">(</span><span class="s2">{ </span><span class="s1">bottom</span><span class="s4">: </span><span class="s5">170</span><span class="s4">, </span><span class="s1">right</span><span class="s4">: </span><span class="s5">40 </span><span class="s2">}</span><span class="s6">)</span>
        <span class="s4">.</span><span class="s1">transition</span><span class="s6">(</span><span class="s1">this</span><span class="s4">.</span><span class="s1">getShow1</span><span class="s6">)</span>

      <span class="s1">Image</span><span class="s6">(</span><span class="s1">$r</span><span class="s6">(</span><span class="s7">'app.media.ic_avatar_stronger3'</span><span class="s6">))</span>
        <span class="s4">.</span><span class="s1">width</span><span class="s6">(</span><span class="s5">80</span><span class="s6">)</span>
        <span class="s4">.</span><span class="s1">borderRadius</span><span class="s6">(</span><span class="s5">40</span><span class="s6">)</span>
        <span class="s4">.</span><span class="s1">position</span><span class="s6">(</span><span class="s2">{ </span><span class="s1">right</span><span class="s4">: </span><span class="s5">50</span><span class="s4">, </span><span class="s1">bottom</span><span class="s4">: </span><span class="s5">380 </span><span class="s2">}</span><span class="s6">)</span>
        <span class="s4">.</span><span class="s1">transition</span><span class="s6">(</span><span class="s1">this</span><span class="s4">.</span><span class="s1">getShow2</span><span class="s6">)</span>

      <span class="s1">Image</span><span class="s6">(</span><span class="s1">$r</span><span class="s6">(</span><span class="s7">'app.media.ic_avatar_stronger4'</span><span class="s6">))</span>
        <span class="s4">.</span><span class="s1">width</span><span class="s6">(</span><span class="s5">80</span><span class="s6">)</span>
        <span class="s4">.</span><span class="s1">borderRadius</span><span class="s6">(</span><span class="s5">40</span><span class="s6">)</span>
        <span class="s4">.</span><span class="s1">position</span><span class="s6">(</span><span class="s2">{ </span><span class="s1">bottom</span><span class="s4">: </span><span class="s5">210</span><span class="s4">, </span><span class="s1">left</span><span class="s4">: </span><span class="s5">60 </span><span class="s2">}</span><span class="s6">)</span>
        <span class="s4">.</span><span class="s1">transition</span><span class="s6">(</span><span class="s1">this</span><span class="s4">.</span><span class="s1">getShow3</span><span class="s6">)</span>

    <span class="s2">}</span>

  <span class="s2">}</span>
<span class="s2">}</span></pre>
</body>
</html>